﻿using System;
using CivilRegistry.ControlledModel.Extensions;

namespace CivilRegistry.ControlledModel
{
    /// <summary>
    /// The present address object.
    /// </summary>
    public partial class PresentAddress
    {
        /// <summary>
        /// Validates the <see cref="PresentAddress"/>.
        /// </summary>
        /// <param name="presentAddress">The <see cref="PresentAddress"/> to validate.</param>
        /// <exception cref="ArgumentNullException">If the required fields are null or having default values.</exception>
        internal static void Validate(PresentAddress presentAddress)
        {
            presentAddress.Address.Required("Address");
            presentAddress.PIN.Required("PIN");
            presentAddress.District.Required("District");
            presentAddress.City.Required("City");
        }
    }
}
